3.42 \(\int \frac{\cos (a+\frac{b}{x^2})}{x^2} \, dx\)

Optimal. Leaf size=74 \[ \frac{\sqrt{\frac{\pi }{2}} \sin (a) S\left (\frac{\sqrt{b} \sqrt{\frac{2}{\pi }}}{x}\right )}{\sqrt{b}}-\frac{\sqrt{\frac{\pi }{2}} \cos (a) \text{FresnelC}\left (\frac{\sqrt{\frac{2}{\pi }} \sqrt{b}}{x}\right )}{\sqrt{b}} \]

[Out]

-((Sqrt[Pi/2]*Cos[a]*FresnelC[(Sqrt[b]*Sqrt[2/Pi])/x])/Sqrt[b]) + (Sqrt[Pi/2]*FresnelS[(Sqrt[b]*Sqrt[2/Pi])/x]
*Sin[a])/Sqrt[b]

________________________________________________________________________________________

Rubi [A]  time = 0.0323861, antiderivative size = 74, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 12, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.333, Rules used = {3384, 3354, 3352, 3351} \[ \frac{\sqrt{\frac{\pi }{2}} \sin (a) S\left (\frac{\sqrt{b} \sqrt{\frac{2}{\pi }}}{x}\right )}{\sqrt{b}}-\frac{\sqrt{\frac{\pi }{2}} \cos (a) \text{FresnelC}\left (\frac{\sqrt{\frac{2}{\pi }} \sqrt{b}}{x}\right )}{\sqrt{b}} \]

Antiderivative was successfully verified.

[In]

Int[Cos[a + b/x^2]/x^2,x]

[Out]

-((Sqrt[Pi/2]*Cos[a]*FresnelC[(Sqrt[b]*Sqrt[2/Pi])/x])/Sqrt[b]) + (Sqrt[Pi/2]*FresnelS[(Sqrt[b]*Sqrt[2/Pi])/x]
*Sin[a])/Sqrt[b]

Rule 3384

Int[Cos[(a_.) + (b_.)*(x_)^(n_)]*(x_)^(m_.), x_Symbol] :> Dist[2/n, Subst[Int[Cos[a + b*x^2], x], x, x^(n/2)],
 x] /; FreeQ[{a, b, m, n}, x] && EqQ[m, n/2 - 1]

Rule 3354

Int[Cos[(c_) + (d_.)*((e_.) + (f_.)*(x_))^2], x_Symbol] :> Dist[Cos[c], Int[Cos[d*(e + f*x)^2], x], x] - Dist[
Sin[c], Int[Sin[d*(e + f*x)^2], x], x] /; FreeQ[{c, d, e, f}, x]

Rule 3352

Int[Cos[(d_.)*((e_.) + (f_.)*(x_))^2], x_Symbol] :> Simp[(Sqrt[Pi/2]*FresnelC[Sqrt[2/Pi]*Rt[d, 2]*(e + f*x)])/
(f*Rt[d, 2]), x] /; FreeQ[{d, e, f}, x]

Rule 3351

Int[Sin[(d_.)*((e_.) + (f_.)*(x_))^2], x_Symbol] :> Simp[(Sqrt[Pi/2]*FresnelS[Sqrt[2/Pi]*Rt[d, 2]*(e + f*x)])/
(f*Rt[d, 2]), x] /; FreeQ[{d, e, f}, x]

Rubi steps

\begin{align*} \int \frac{\cos \left (a+\frac{b}{x^2}\right )}{x^2} \, dx &=-\operatorname{Subst}\left (\int \cos \left (a+b x^2\right ) \, dx,x,\frac{1}{x}\right )\\ &=-\left (\cos (a) \operatorname{Subst}\left (\int \cos \left (b x^2\right ) \, dx,x,\frac{1}{x}\right )\right )+\sin (a) \operatorname{Subst}\left (\int \sin \left (b x^2\right ) \, dx,x,\frac{1}{x}\right )\\ &=-\frac{\sqrt{\frac{\pi }{2}} \cos (a) C\left (\frac{\sqrt{b} \sqrt{\frac{2}{\pi }}}{x}\right )}{\sqrt{b}}+\frac{\sqrt{\frac{\pi }{2}} S\left (\frac{\sqrt{b} \sqrt{\frac{2}{\pi }}}{x}\right ) \sin (a)}{\sqrt{b}}\\ \end{align*}

Mathematica [A]  time = 0.109059, size = 62, normalized size = 0.84 \[ -\frac{\sqrt{\frac{\pi }{2}} \left (\cos (a) \text{FresnelC}\left (\frac{\sqrt{\frac{2}{\pi }} \sqrt{b}}{x}\right )-\sin (a) S\left (\frac{\sqrt{b} \sqrt{\frac{2}{\pi }}}{x}\right )\right )}{\sqrt{b}} \]

Antiderivative was successfully verified.

[In]

Integrate[Cos[a + b/x^2]/x^2,x]

[Out]

-((Sqrt[Pi/2]*(Cos[a]*FresnelC[(Sqrt[b]*Sqrt[2/Pi])/x] - FresnelS[(Sqrt[b]*Sqrt[2/Pi])/x]*Sin[a]))/Sqrt[b])

________________________________________________________________________________________

Maple [A]  time = 0.035, size = 48, normalized size = 0.7 \begin{align*} -{\frac{\sqrt{2}\sqrt{\pi }}{2} \left ( \cos \left ( a \right ){\it FresnelC} \left ({\frac{\sqrt{2}}{\sqrt{\pi }x}\sqrt{b}} \right ) -\sin \left ( a \right ){\it FresnelS} \left ({\frac{\sqrt{2}}{\sqrt{\pi }x}\sqrt{b}} \right ) \right ){\frac{1}{\sqrt{b}}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(a+b/x^2)/x^2,x)

[Out]

-1/2*2^(1/2)*Pi^(1/2)/b^(1/2)*(cos(a)*FresnelC(b^(1/2)*2^(1/2)/Pi^(1/2)/x)-sin(a)*FresnelS(b^(1/2)*2^(1/2)/Pi^
(1/2)/x))

________________________________________________________________________________________

Maxima [C]  time = 1.37842, size = 495, normalized size = 6.69 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(a+b/x^2)/x^2,x, algorithm="maxima")

[Out]

-1/8*(((sqrt(pi)*(erf(sqrt(I*b/x^2)) - 1) + sqrt(pi)*(erf(sqrt(-I*b/x^2)) - 1))*cos(1/4*pi + 1/2*arctan2(0, b)
) + (sqrt(pi)*(erf(sqrt(I*b/x^2)) - 1) + sqrt(pi)*(erf(sqrt(-I*b/x^2)) - 1))*cos(-1/4*pi + 1/2*arctan2(0, b))
+ (-I*sqrt(pi)*(erf(sqrt(I*b/x^2)) - 1) + I*sqrt(pi)*(erf(sqrt(-I*b/x^2)) - 1))*sin(1/4*pi + 1/2*arctan2(0, b)
) + (I*sqrt(pi)*(erf(sqrt(I*b/x^2)) - 1) - I*sqrt(pi)*(erf(sqrt(-I*b/x^2)) - 1))*sin(-1/4*pi + 1/2*arctan2(0,
b)))*cos(a) + ((-I*sqrt(pi)*(erf(sqrt(I*b/x^2)) - 1) + I*sqrt(pi)*(erf(sqrt(-I*b/x^2)) - 1))*cos(1/4*pi + 1/2*
arctan2(0, b)) + (-I*sqrt(pi)*(erf(sqrt(I*b/x^2)) - 1) + I*sqrt(pi)*(erf(sqrt(-I*b/x^2)) - 1))*cos(-1/4*pi + 1
/2*arctan2(0, b)) - (sqrt(pi)*(erf(sqrt(I*b/x^2)) - 1) + sqrt(pi)*(erf(sqrt(-I*b/x^2)) - 1))*sin(1/4*pi + 1/2*
arctan2(0, b)) + (sqrt(pi)*(erf(sqrt(I*b/x^2)) - 1) + sqrt(pi)*(erf(sqrt(-I*b/x^2)) - 1))*sin(-1/4*pi + 1/2*ar
ctan2(0, b)))*sin(a))/(x*sqrt(abs(b)/x^2))

________________________________________________________________________________________

Fricas [A]  time = 1.60756, size = 186, normalized size = 2.51 \begin{align*} -\frac{\sqrt{2} \pi \sqrt{\frac{b}{\pi }} \cos \left (a\right ) \operatorname{C}\left (\frac{\sqrt{2} \sqrt{\frac{b}{\pi }}}{x}\right ) - \sqrt{2} \pi \sqrt{\frac{b}{\pi }} \operatorname{S}\left (\frac{\sqrt{2} \sqrt{\frac{b}{\pi }}}{x}\right ) \sin \left (a\right )}{2 \, b} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(a+b/x^2)/x^2,x, algorithm="fricas")

[Out]

-1/2*(sqrt(2)*pi*sqrt(b/pi)*cos(a)*fresnel_cos(sqrt(2)*sqrt(b/pi)/x) - sqrt(2)*pi*sqrt(b/pi)*fresnel_sin(sqrt(
2)*sqrt(b/pi)/x)*sin(a))/b

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\cos{\left (a + \frac{b}{x^{2}} \right )}}{x^{2}}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(a+b/x**2)/x**2,x)

[Out]

Integral(cos(a + b/x**2)/x**2, x)

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\cos \left (a + \frac{b}{x^{2}}\right )}{x^{2}}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(a+b/x^2)/x^2,x, algorithm="giac")

[Out]

integrate(cos(a + b/x^2)/x^2, x)